package com.yufa.springcloud.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

@FeignClient(name = "provider-file", configuration = FeignClient01Config.class, fallbackFactory = FeignClient01Hystrix.class)
public interface FeignClient01 {

    @PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    List<String> upload(@RequestPart("file") MultipartFile file);

}
